import java.util.*;

public class task4 {

	public static double[] reverseArray(double[] x) {
		
		double[] y = new double[x.length];
		
		for(int i=0 ; i<x.length ; i++)
		{
			y[x.length-(i+1)] = x[i];
		}
			
		return y;
	}
	
	public static void printArray(double[] y){
		
		System.out.print("The reversed array is: ");
		
		for(int i=0 ; i<y.length ; i++)
			System.out.printf("%.1f ", y[i]);
		
	}
	
	public static void main(String[] args) {
		
		int size;
		Scanner sc = new Scanner(System.in);
		
		do {
			System.out.print("Enter the array size: ");
			size = sc.nextInt();
		}while(size < 1);
				
		double [] x = new double[size];
		
		System.out.printf("Enter %d values%n",size);
		
		for(int i=0 ; i<size ; i++)
			x[i]= sc.nextDouble();
			
		
		double[] y;
		
		y = reverseArray(x);
		
		printArray(y);
		
		sc.close();

	}

}
